import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const listTenant = (data) => request({
    url: baseUrl + '/system/tenant/list',
    method: 'get',
    params: data
});

export const addTenant = (data) => request({
    url: baseUrl + '/system/tenant',
    method: 'post',
    data:data
});

export const updateTenant = (data) => request({
    url: baseUrl + '/system/tenant',
    method: 'put',
    data:data
});


export const delTenant = (tenantId) => request({
    url: baseUrl + '/system/tenant/'+tenantId,
    method: 'delete'
});

export const dropDownTenants = () => request({
    url: baseUrl + '/system/tenant/dropDownTenants',
    method: 'get'
});

export const configTenantPer = (data) => request({
    url: baseUrl + '/system/tenant/configTenantPer',
    method: 'put',
    data:data
});

export const changeTenantStatus = (data) => request({
    url: baseUrl + '/system/tenant/changeTenantStatus/'+data.tenantId+'/'+data.tenantStatus,
    method: 'put'
    // params: {
    //     ...data
    // }
});